<template>
	<div class = "vmodel">
		<h3>10 v-model command </h3>
		<p>
			<input type="text" v-model="username"></p>
			<button v-on:click="getUsername()"></button>
			<button @click="ChengeUsername()"></button>
		
	</div>
</template>


<script setup>
	import {ref} from 'vue'
	let username = ref('李明')
	const getUsername = () => {
		alert('username的值是' + username.value)
	}
	const ChengeUsername = () => {
		username.value = 'wxf'
	}

</script>



<style scoped>

</style>
